varying vec2 texCoords;
uniform sampler2D tex;
uniform int type;
uniform sampler2D tex2;
void main()
{
    vec4 color = vec4(0,0,0,1);
   if (type == 0){
       color = texture2D(tex,texCoords);
        if (color.x > .3 && color.y > .3 && color.z > .3){
            color.a = 0.0;
        }
        color.r /= 1.5;
        color.b /=1.5;
    }
    else if (type == 1){
       color = texture2D(tex2,texCoords);
        if (color.x > .3 && color.y > .3 && color.z > .3){
            color.a = 0.0;
        }
        color.r /= 2.0;
        color.g /= 1.5;
        color.b /=2.0;
    }


    gl_FragColor = color;
}
